<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>

<% String member_id=(String)session.getAttribute("member_id"); 
	String level=(String)session.getAttribute("level");
	if(level==null){
		%>
			<script type="text/javascript">
			alert("잘못된정보임니다.");
			history.back();
			</script>
		<%
	}else if(!level.equals("0"))
	{
		%>
		<script type="text/javascript">
		alert("잘못된정보임니다.");
		history.back();
		</script>
	<%
	}else if(!member_id.equals("admin")){
			%>
			<script type="text/javascript">
			alert("잘못된정보임니다.");
			history.back();
			</script>
		<%	
	}
%>

<body>

<h1>공지사항</h1>

<form action="./NoticleWritingAction.bo" method="post">
<table>
<tr><td>작성자</td><td>관리자</td></tr>
<tr><td>제목</td><td><input type="text"></td></tr>
<tr><td>내용</td><td><textarea cols="30" rows="20"></textarea></td></tr>
<tr><td colspan="2"><input type="submit" value="글쓰기"><input type="reset" value="다시 쓰기"></td></tr>
</table>
</form>
</body>
</html>